package com.me.seckill.util;

/**
 * 线程睡眠工具类
 *
 * @author ME
 * @date   2019/2/2 16:19
 */
public class SleepUtil {

    /**
     * 休眠多少毫秒
     * @param millis
     */
    public static void ms(long millis) {
        try {
            Thread.sleep(millis);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    /**
     * 休眠多少秒
     * @param seconds
     */
    public static void seconds(long seconds) {
        try {
            Thread.sleep(seconds * 1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
